#include <iostream>
#include <vector>
#include <string>

using namespace std;

const int N = 1e6 + 10;

vector<int> mul(vector<int> &A, const int &B)
{
    vector<int> C;
    for (int i = 0, t = 0; i < A.size() || t; i++)
    {
        if (i < A.size())
            t += A.at(i) * B;
        C.push_back(t % 10);
        t /= 10;
    }
    while (C.size() > 1 && C.back() == 0)
        C.pop_back();

    return C;
}

int main(void)
{
    vector<int> A;
    string a;
    int B;
    cin >> a >> B;

    for (auto x = a.rbegin(); x != a.rend(); x++)
        A.push_back(*x - '0');

    auto C = mul(A, B);
    for (int i = C.size() - 1; i >= 0; i--)
        cout << C.at(i);
    cout << endl;
}